/*******************************************************************************
 * Copyright (c) 2008, 2009 Tapestry IDE Developers
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Tapestry IDE Developers - initial API and implementation
 *******************************************************************************/
package com.googlecode.tapestry.ide.core.model;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;

/**
 * The Interface ITapestryProject.
 */
public interface ITapestryProject extends IResourceModelElement {

	/**
	 * Gets the project.
	 * 
	 * @return the project
	 */
	IProject getProject();

	/**
	 * Gets the pages.
	 * 
	 * @return the pages
	 */
	ITapestryContainer<? extends ITapestryPage> getPages();

	/**
	 * Gets the components.
	 * 
	 * @return the components
	 */
	ITapestryContainer<? extends ITapestryComponent> getComponents();

	/**
	 * Gets the item.
	 * 
	 * @param name
	 *            the name
	 * @param itemClass
	 *            the item class
	 * 
	 * @return the item
	 */
	<T extends ITapestryItem> ITapestryItem getItem(String name,
			Class<T> itemClass);

	/**
	 * Checks if is tapestry resource.
	 * 
	 * @param resource
	 *            the resource
	 * 
	 * @return true, if is tapestry resource
	 */
	boolean isTapestryResource(IResource resource);

	/**
	 * Checks if is populated.
	 * 
	 * @return true, if is populated
	 */
	boolean isPopulated();

}
